#pragma once
#include "Player.h"
#include "TextManager.h"
#include <SFML\Graphics.hpp>
#include "Animation.h"
class Octopi {
public:
 Octopi();
 ~Octopi();

 void Initialize(sf::RenderWindow* window, sf::Texture* texture, sf::Texture* attackTexture, sf::Texture* splashTexture, sf::Texture* deadTexture, sf::Texture* takeDamageTexture, bool in, int type,  sf::Texture* bloodTexture);
 void Update(Player* player, TextManager* textManager);
 void Render();
 void Cleanup();

 void Kill()				{  m_hit = true; }
 void SetPosX(float xPos)	{	m_posX = xPos;	}
 void SetSide(int sideIn)	{	side = sideIn;	}
 int GetSide()				{	return	side;	}

 bool m_isDead;
 float m_posY;


 sf::Sprite* m_octSprite;
 sf::Texture* m_attackTexture;
 sf::Texture* m_deadTexture;
 bool m_canDie;
 bool m_isFirst;

private:
 float m_alphaBlood;
 int side;
 float m_posX;
 unsigned int m_layer;
 unsigned int m_position;
 bool m_hit;
 int m_alpha;
 float m_attackTimer;

 int m_type;
 bool m_attack;

 bool m_friend;

 int m_frames; 
 float m_hitTime;
 float m_speed;
 float m_deltaTime;
 float m_timePassed;
 float m_scale;
 int m_loopNr;

 sf::Sprite* m_hitSprite;
 sf::Sprite* m_takeDamageSprite;
 sf::Sprite* m_bloodSprite;
 sf::RenderWindow* m_renderWindow;
 //EnemyManager* enyman;
 sf::Clock* m_clock;
 sf::Clock* m_attackClock;
 float speed;
 float scaleSpeed;
 bool alreadyShownScore;
 bool m_isFriendly;

 bool m_bloodPos;
 float m_bloodTimer;

 Animation* m_shadowAni;
 Animation* m_anim;
  Animation* m_splashAni;
  Animation* m_bloodAni;
};